package bdz.framework.web.vo
{
	import flash.events.EventDispatcher;
	import flash.utils.ByteArray;
	public class BDZWFTemplateUI extends EventDispatcher
	{
		private var _source:XML;
		public function BDZWFTemplateUI(xm:XML = null)
		{	
			super();
			if(xm){
				_source = xm;
			}else{
				_source = new XML("<ui/>");
			}
		}
		public function get template_ui_id():Number{
			return Number(_source.template_ui_id);
		}
		public function get template_id():Number{
			return Number(_source.template_id);
		}
		public function set template_id(n:Number):void{
			_source.template_id = n;
		}
		public function get label():String{
			return _source.label.toString();
		}
		public function set label(str:String):void{
			_source.label = str;
		}
		public function get ui_id():Number{
			return Number(_source.ui_id);
		}
		public function set ui_id(n:Number):void{
			_source.ui_id = n.toString();
		}
		public function get order():Number{
			return _source.order;
		}
		public function set order(n:Number):void{
			_source.order = n.toString();
		}
		public function get info():String{
			var ba:ByteArray = new ByteArray();
			ba.writeUTFBytes(_source.info.toString());
			try{
				ba.uncompress();
				return ba as String;
			}catch(e:Error){};
			return _source.info.toString();
		}
		public function set info(str:String):void{
			var ba:ByteArray = new ByteArray();
			ba.writeUTFBytes(str);
			ba.compress();
			_source.info = ba;
		}
		public function get client_ui():String{
			return _source.client_ui;
		}
		public function set client_ui(str:String):void{
			_source.client_ui = str;
		}
		public function get source():XML{
			return _source;
		}
		
	}
}